Refactoring old javascript code, what is an effective replacement of ActiveX? Below is an example of how it is being used.
var xmlhttp = new ActiveXObject("MSXML2.XMLHTTP");
var sURL = homeURL + "/Utility.asmx";
xmlhttp.Open("POST", sURL, false);
xmlhttp.setRequestHeader("SOAPAction", "http://tempuri.org/DestroyScreen");
xmlhttp.setRequestHeader("Content-Type", "text/xml");
var sPayload = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
sPayload += "<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>";
sPayload += "<soap:Body>";
sPayload += "<DestroyScreen xmlns='http://tempuri.org/'>";
sPayload += "<screenID>" + WebScreen.ScreenID + "</screenID>";
sPayload += "<instanceID>" + WebScreen.ScreenInstance + "</instanceID>";
sPayload += "</DestroyScreen>";
sPayload += "</soap:Body>";
sPayload += "</soap:Envelope>";
xmlhttp.Send(sPayload);